package core.command
{
	import core.event.SocketEventID;
	import core.event.UnoEvent;
	import core.event.ViewEventID;

	public class RollCommand extends SuperCommand
	{
		public function RollCommand()
		{
			socketEvent = SocketEventID.ROLL;
			viewEvent = ViewEventID.ROLL;
		}
		
		override public function success(e:UnoEvent):void
		{
			var user:Object = db.tableList[db.loginUser.table].userList[e.data.seatID];
			if(user.hasOwnProperty("roll") && user.roll > 0)
			{}
			else
			{
				user.roll = e.data.roll;
			}
		}
	}
}